<template>
  <BaseContainer>
    <aplid-base-crud ref="crud" class="w-100" v-bind="baseConfig" :paramsObj="paramsObj">
      <template v-slot:ArchivesDialog="{ row, show }">
        <Archives @refresh="handleRefresh" @rechange="handleOperate" :api="baseConfig.api" :key="show" :showBtn="false"
          :nowRowData="row">
        </Archives>
      </template>
    </aplid-base-crud>
  </BaseContainer>
</template>

<script setup lang="ts">
import { inject } from 'vue';
import { baseConfig } from './config'
import Archives from '@/views/datacenter/basicData/practitioner/Archives/index.vue'

let paramsObj = ref({})
const nowRowData: any = inject('nowRowData')
paramsObj.value = { creditCode: nowRowData.creditCode }
const crud = ref(null)
const handleRefresh = (query, visible = false) => {
  nextTick(() => {
    crud.value.refreshChange(query)
  })
}
const handleOperate = (type, row, title) => {
  nextTick(() => {
    crud.value.handleOperate(type, row, title)
  })
}
</script>

<style scoped></style>